<?PHP
/*
--> Post summary for a group

select count(*) 'Total #', Year(A.message_creation_time) 'Year', Day(A.message_creation_time) 'Day', Month(A.message_creation_time) 'Year' 

INTO OUTFILE 'e:/aripata.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'

from wpfb_group_post_collection A
group by A.from_group_id, Day(A.message_creation_time), Month(A.message_creation_time), Year(A.message_creation_time)
having A.from_group_id='368809433220789' 
order by count(*) desc, Year(A.message_creation_time) desc, Month(A.message_creation_time), Day(A.message_creation_time)

*/

?>